var  grapeshover=document.querySelector("#grapes_hover");
var  grapesdiv=document.querySelector("#nav_junp>div:nth-child(2)");
var  keepout=document.querySelector("#keepout");
var grapesdiva=document.querySelector("#nav_junp>div:nth-child(2)>a");
var t=0;
var timer=null;
//隐藏栏
grapesdiva.onmouseover=function(event){
		timer=setInterval(function(){
			if (t<200) {
			t+=2;	
			}
		   grapeshover.style.height=t+"px";
		   keepout.style.display="block";
	},1)
}
grapesdiva.onmouseout=function(event){
	       clearInterval(timer);
	       t=0;
		   grapeshover.style.height=t+"px";
		   keepout.style.display="none";
}

keepout.onmouseover=function(){
	        t=200;
            keepout.style.display="block";
			 grapeshover.style.height=t+"px";
}
keepout.onmouseout=function(){
	        t=0;
            keepout.style.display="none";
			 grapeshover.style.height=t+"px";
}
//图片手机移入效果
var proPicDivs=document.querySelectorAll("#woproduct_pic>div");
var proPicYindivs=document.querySelectorAll("#wpropic_yin>div");
var proPicYin=document.querySelector("#wpropic_yin");
var producPic =document.querySelector("#woproduct_pic")
for (var i=0;i<proPicDivs.length;i++) {
	proPicDivs[i].index=i;
	proPicDivs[i].onmouseover=function(){
		for (var j=0;j<proPicYindivs.length;j++) {
			proPicYindivs[j].style.opacity="0";
		}
		proPicYindivs[this.index].style.opacity="1";
	}
    proPicDivs[i].onmouseleave=function(){
	proPicYindivs[this.index].style.opacity="0";
   }
}
for (var i=0;i<proPicYindivs.length;i++) {
	proPicYindivs[i].index=i;
	proPicYindivs[i].onmouseover=function(){
    proPicYindivs[this.index].style.opacity="1";
	}
	proPicYindivs[i].onmouseleave=function(){
    this.style.opacity="0";
	}
}
//视频
var vidicoimg=document.querySelector("#video_icon>div>img");
var video=document.querySelector("#video");
vidicoimg.onclick=function(){
	video.style.display="block";

}
var closediv=document.querySelector("#close>div");
closediv.onclick=function(){
	video.style.display="none";
}



















